﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using RFID_Interface.DTO;

namespace UnitTest
{
	[TestClass]
	public class Test_BarcodeInfo
	{
		[TestInitialize]
		public void Setup()
		{
			WyUnity.Data.DbManager.SetDefaultConnectionString(WyUnity.Data.DataAccess.Dialect.MSSQLDialect.Instance
				, "server=.;uid=sa;pwd=123456;database=jn2014;");
		}
		RFID_Interface.K3Service s = new RFID_Interface.K3Service();

		[TestMethod]
		public void TestMethod1()
		{
			var rlt = s.Get_Barcode_Info(new[] { "12345010101123001" });

			OutputResult(rlt);
		}

		public void OutputResult(BarcodeInfo[] bs)
		{
			
			if (bs == null || bs.Length == 0) Console.WriteLine("没有结果");
			foreach (var b in bs)
			{
				Console.WriteLine(b.Number);
			}
		}
	}
}